<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let f=prompt("请输入时间")
        if(f<9){
            alert("早上好!")
        }else if(f<12){
            alert("上午好!")        
        }else if(f<14){
            alert("中午好!")
        }else if(f<17){
            alert("下午好！")
        }else if(f<19){
            alert("傍晚好！")
        }else{
            alert("夜里好！")
        }
    </script>
</body>
</html>